<%@ page language="java" contentType="application/vnd.ms-excel;charset=UTF-8"  pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld"%>
<%
   String sortType=request.getParameter("conds.sortType");
   System.out.println("sortType="+sortType);
   String fileName="";
   if(sortType.equals("1")){
   		fileName="集团福建省产品目录.xls";
   }else{
   		fileName="福建省产品目录.xls";
   }
   fileName=java.net.URLEncoder.encode(fileName, "UTF-8");
	response.setHeader("Content-Disposition",
			"attachment; filename="+fileName);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="Content-Type" content="application/vnd.ms-excel; charset=UTF-8">
		<title>欢迎访问产品运营互动中心！</title>
	</head>
	<body leftmargin="0" topmargin="0">
		<table id="sortTable" width="98%" border="1" cellspacing="0"
			cellpadding="7" align="center" >
			<tr>
				<td  width="15%">
					<div>
						<font >一级目录 </font>
					</div>
				</td>
				<td  width="15%">
					<div>
						<font >二级目录 </font>
					</div>
				</td>
				<td  width="15%">
					<div>
						<font >三级目录 </font>
					</div>
				</td>
				<td  width="15%">
					<div>
						<font >四级目录 </font>
					</div>
				</td>
				<td  width="15%">
					<div>
						<font >五级目录 </font>
					</div>
				</td>
				<td  width="*">
					<div>
						<font >拓展目录 </font>
					</div>
				</td>
			</tr>
			<s:iterator value="productSorts" id="p1">
				<s:if test="#p1.parentSort==0">
					<tr >
						<td>
							${p1.name}
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
						<td>
							&nbsp;
						</td>
					</tr>
					<s:iterator value="productRefSorts">
						<tr >
							<td>
								&nbsp;
							</td>
							<td>
								<s:property value="productName" />
							</td>
							<td>
								&nbsp;
							</td>
							<td>
								&nbsp;
							</td>
							<td>
								&nbsp;
							</td>
							<td>
								&nbsp;
							</td>
					    </tr>
					</s:iterator>
					<s:iterator value="productSorts" id="p2">
						<s:if test="#p2.parentSort==#p1.id">
							<tr >
								<td>
									&nbsp;
								</td>
								<td>
									${p2.name}
								</td>
								<td>
									&nbsp;
								</td>
								<td>
									&nbsp;
								</td>
								<td>
									&nbsp;
								</td>
								<td>
									&nbsp;
								</td>
							</tr>
							<s:iterator value="productRefSorts">
								<tr >
									<td>
										&nbsp;
									</td>
									<td>
										&nbsp;
									</td>
									<td>
										<s:property value="productName" />
									</td>
									<td>
										&nbsp;
									</td>
									<td>
										&nbsp;
									</td>
									<td>
										&nbsp;
									</td>
							    </tr>
							</s:iterator>
							<s:iterator value="productSorts" id="p3">
								<s:if test="#p3.parentSort==#p2.id">
									<tr >
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
										<td>
											${p3.name}
										</td>
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
									</tr>
									<s:iterator value="productRefSorts">
										<tr >
											<td>
												&nbsp;
											</td>
											<td>
												&nbsp;
											</td>
											<td>
												&nbsp;
											</td>
											<td>
												<s:property value="productName" />
											</td>
											<td>
												&nbsp;
											</td>
											<td>
												&nbsp;
											</td>
									    </tr>
									</s:iterator>
									<s:iterator value="productSorts" id="p4">
										<s:if test="#p4.parentSort==#p3.id">
											<tr >
												<td>
													&nbsp;
												</td>
												<td>
													&nbsp;
												</td>
												<td>
													&nbsp;
												</td>
												<td>
													${p4.name}
												</td>
												<td>
													&nbsp;
												</td>
												<td>
													&nbsp;
												</td>
											</tr>
											<s:iterator value="productRefSorts">
												<tr >
													<td>
														&nbsp;
													</td>
													<td>
														&nbsp;
													</td>
													<td>
														&nbsp;
													</td>
													<td>
														&nbsp;
													</td>
													<td>
														<s:property value="productName" />
													</td>
													<td>
														&nbsp;
													</td>
											    </tr>
											</s:iterator>
<!--增加第五级目录-pany-091026-->
											<s:iterator value="productSorts" id="p5">
												<s:if test="#p5.parentSort==#p4.id">
													<tr >
														<td>
															&nbsp;
														</td>
														<td>
															&nbsp;
														</td>
														<td>
															&nbsp;
														</td>
														<td>
															&nbsp;
														</td>
														<td>
															${p5.name}
														</td>
														<td>
															&nbsp;
														</td>
													</tr>
													<s:iterator value="productRefSorts">
														<tr >
															<td>
																&nbsp;
															</td>
															<td>
																&nbsp;
															</td>
															<td>
																&nbsp;
															</td>
															<td>
																&nbsp;
															</td>
															<td>
																&nbsp;
															</td>
															<td>
																<s:property value="productName" />
															</td>
													    </tr>
													</s:iterator>
												</s:if>
											</s:iterator>
											
											
										</s:if>
									</s:iterator>
								</s:if>
							</s:iterator>
						</s:if>
					</s:iterator>
				</s:if>
			</s:iterator>
		</table>
	</body>
</html>
